package xyz.bali16.module.article.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import com.gitee.starblues.annotation.Supplier;
import xyz.bali16.module.article.entity.Article;
import xyz.bali16.module.article.model.ArticleAddParam;
import xyz.bali16.module.article.model.ArticlePageParam;
import xyz.bali16.module.article.model.ArticleUpdateParam;

import java.util.List;

@Supplier("article")
public interface ArticleService extends IService<Article> {

	/**
	 * 分页查询用户列表
	 * @param param 参数
	 * @return 分页结果
	 */
	@Supplier.Method("supperList")
	List<Article> supperList(List<String> ids);
	@Supplier.Method("supperUpdateById")
	boolean supperUpdateById(List<Article> article);
	IPage<Article> getPage(ArticlePageParam param);

    void add(ArticleAddParam param) throws Exception;

    void update(ArticleUpdateParam param) throws Exception;

    void delete(String tagId) throws Exception;

	/**
	 * 修改文章状态
	 * @param articleId 文章id
	 * @param status 1 启用, 0 禁用
	 */
	void updateStatus(String articleId, int status);


	@Supplier.Method("countArticle")
	Integer countArticle();
	@Supplier.Method("supperGetById")
	Article supperGetById(String id);

}
